<?php
namespace Modules\Auth\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class UserResource extends JsonResource{
    public function toArray($request): array{
        return [
            'id'=>$this->id,
            'name'=>$this->name,
            'email'=>$this->email,
            'created'=>$this->created_at->format('Y-m-d H:i:s'),
            'updated'=>$this->updated_at->format('Y-m-d H:i:s')
        ];
    }
}
